<script setup>
import {onMounted, onUnmounted} from "vue";
import {useStore} from "vuex";
const store = useStore()

onMounted(() => {
  store.commit('set_screenSize',window.innerWidth)
  window.addEventListener('resize', handleResize);
});

onUnmounted(() => {
  window.removeEventListener('resize', handleResize);
});

const handleResize = () => {
  store.commit('set_screenSize',window.innerWidth)
};
</script>

<template>
  <router-view />
</template>

<style scoped>

</style>
